// components/navbar/index.js
const app = getApp();
Component({
  properties: {
    kefuSetting: {
      type: Object,
      value: '',
      observer:''
    }
  },
  data: {
    sessionForm: app.globalData.sessionForm ? app.globalData.sessionForm:''
  },
  attached: function () {
    var that = this;
    app.setNavColor(that);
  },
  methods: {
    getPhoneNumber: function (e) {
      var that = this;
      app.getPhone(e, that);
    },
    contactRecord: function (e) {
      var that = this;
      that.setData({
        isShowkfreply:false
      })
      app.contactRecord(e);
    },
    replyTip:function(e){
      var that = this;
      var tips = e.currentTarget.dataset.tips;
      var replydata = {
        replyTips: tips,
        isShowkfreply: true
      };
      that.setData(replydata)
      console.log(that.data.isShowkfreply);
      that.triggerEvent('getreply', replydata)
    },
    hideTip:function(){
      var that = this;
      that.setData({
        isShowkfreply: false
      })
    }
  }
})